package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/9/18.
 */
public class ReplyDetailAction extends AHttpService<PbBean.PbResQuestionFindAnswer> {
    private int id;

    private ReplyDetailAction(Context context, int id) {
        super(context);
        this.id = id;
    }

    public static ReplyDetailAction newInstance(Context context, int id) {
        return new ReplyDetailAction(context, id);
    }


    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqQuestionFindAnswer.Builder builder = PbBean.PbReqQuestionFindAnswer.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setAnswerId(id);

        return apiService.quizReplyDetail(builder.build());
    }
}
